8870c936715f90337c90d3588b05d3ce8c7e680f,src/main/java/co/kepler/fastcraftplus/updater/Release.java,Release,fetchReleases,#,121

Before Change


                    // Get release information
                    Version version = new Version(attributes.getNamedItem("version").getNodeValue());
                    Stability stable = Stability.fromString(attributes.getNamedItem("stable").getNodeValue());
                    URL url = new URL(attributes.getNamedItem("url").getNodeValue());
                    String md5 = attributes.getNamedItem("md5").getNodeValue();

                    // Loop through the list of changes in this release

After Change


                Node relNode = releaseNodes.item(i);
                if (relNode.getNodeType() != Node.ELEMENT_NODE) continue;
                try {
                    NamedNodeMap attributes = relNode.getAttributes();

                    // Get release information strings
                    String versionStr = attr(attributes, "version");
                    String stableStr = attr(attributes, "stable");
                    String urlStr = attr(attributes, "url");
                    String md5 = attr(attributes, "md5");
                    if (versionStr == null || stableStr == null || urlStr == null || md5 == null) {
                        FastCraftPlus.debug("Unable to fetch release with invalid attributes:");
                        FastCraftPlus.debug(String.format("version=%1s, stable=%2s, url=%3s, md5=%4s",
                                versionStr, stableStr, urlStr, md5));